//
//  BCSettingLogoutView.m
//  GSBlockChain
//
//  Created by guoshikeji_a on 2018/11/30.
//  Copyright © 2018 guoshikeji. All rights reserved.
//

#import "BCSettingLogoutView.h"

@implementation BCSettingLogoutView

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self setupSubviews];
    }
    return self;
}


- (void)setupSubviews {
    UIView *contentView = [UIView new];
    [self addSubview:contentView];
    [contentView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.right.mas_equalTo(self);
        make.height.mas_equalTo([self.class contentHeight]);
    }];
    _logoutButton = [QMUIButton new];
    [_logoutButton setTitle:BCLocalizedKey(@"Logout") forState:UIControlStateNormal];
    [_logoutButton setTitleColor:[UIColor qmui_colorWithHexString:@"#333333"] forState:UIControlStateNormal];
    _logoutButton.titleLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightMedium];
    [contentView addSubview:_logoutButton];
    [_logoutButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.centerY.mas_equalTo(contentView);
        make.width.mas_equalTo(contentView);
        make.height.mas_equalTo(contentView).offset(-10.0);
    }];
}



+ (CGFloat)contentHeight {
    return 90.0;
}
+ (CGFloat)defaultHeight {
    return [self contentHeight]+Height_Bottom_SafeArea;
}

@end
